//package dream.technology.mockTest;
//
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONObject;
//import com.dream.technology.controller.BaiQiShiController;
//import com.dream.technology.db.entity.BaiQiShiCusVo;
//import com.dream.technology.db.entity.CusCustomerVo;
//import com.dream.technology.db.entity.PhoneInfoVo;
//import com.dream.technology.fegin.CreditInnerClient;
//import com.dream.technology.fegin.UserCenterApiClient;
//import com.dream.technology.framework.data.GenericRspDTO;
//import com.dream.technology.utils.parse.ObjectUtil;
//import com.dream.technology.zycashLog.Console;
//import org.junit.Before;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.http.MediaType;
//import org.springframework.test.context.ActiveProfiles;
//import org.springframework.test.context.junit4.SpringRunner;
//import org.springframework.test.web.servlet.MockMvc;
//import org.springframework.test.web.servlet.setup.MockMvcBuilders;
//
//import java.util.Map;
//
//import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
//import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
//import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
//
///**
// * 描述：
// *
// * @author chen_q_i@163.com
// * 2019/1/18 : 16:55.
// * @version : 1.0
// */
//@ActiveProfiles("dev")
//@RunWith(SpringRunner.class)
//@SpringBootTest
//public class BaiqiShiEventMock {
//    @Autowired
//    private BaiQiShiController baiQiShiController;
//    @Autowired
//    private UserCenterApiClient userCenterApiClient;
//    @Autowired
//    private CreditInnerClient apiClient;
//
//    private MockMvc mvc;
//
//    @Before
//    public void setup(){
//        mvc = MockMvcBuilders.standaloneSetup(baiQiShiController).build();
//    }
//
//
//    //39.8254131034,116.4440917969
//    @Test
//    public void exampleTest() throws Exception {
//        String loginVerify = "/risk/api/baiQiShiEvent/loginVerify";
//        String reBorrowingLoginVerify = "/risk/api/baiQiShiEvent/reBorrowingLoginVerify";
//        String bindVerify = "/risk/api/baiQiShiEvent/bindVerify";
//        String authVerify = "/risk/api/baiQiShiEvent/authVerify";
//        String modifyVerify = "/risk/api/baiQiShiEvent/modifyVerify";
//        String registerVerify = "/risk/api/baiQiShiEvent/registerVerify";
//
//
//
//
//
//
////        testUrl(reBorrowingLoginVerify);
////        testUrl(bindVerify);
////        testUrl(authVerify);
////        testUrl(modifyVerify);
////        testUrl(registerVerify);
//        testUrlcus(modifyVerify);
//
//    }
//
//
//    String cus = "{\"cusCustomerVo\":{\"birthDate\":\"1995-01-02\",\"cardId\":96,\"cardNumber\":\"14020219950102156X\",\"createDate\":1551088921000,\"enabled\":true,\"gender\":true,\"id\":72,\"isActiveApp\":true,\"isBlackList\":false,\"locked\":false,\"loginFailureCount\":0,\"merchantCode\":\"merchant20190212152828\",\"merchantId\":36,\"merchantName\":\"测试商户赵珂 001\",\"mobile\":\"13261970105\",\"password\":\"01ee33582c2a02ca6ce34754e66c1a68b10c82817211fd03\",\"productCode\":\"merchantProduct20190212155425\",\"productId\":61,\"productName\":\"安居借\",\"reBorrow\":false,\"realName\":\"康瑞\",\"registerIp\":\"182.48.105.69\",\"token\":\"6c717864b9f888fe53304ce6218c62aa\",\"updateDate\":1552472220000}}";
//
//
//
//
//    public void testUrlcus(String url) throws Exception {
//        BaiQiShiCusVo baiQiShiCusVo = JSON.parseObject(cus, BaiQiShiCusVo.class);
////        Console.info("---------->>>>>{}",jsonObject.toJSONString());
//        Console.info("ss","---------->>>>>--------------------------");
//        this.mvc.perform(post(url)
//                .contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)
////                .content(JSONObject.toJSONString(baiQiShiCusVo)))
//                .param("s",cus))
//                .andDo(print())
//                .andExpect(status().isOk())
//                .andDo(print());
//
//
//        Console.info("ss","---------------------------------------");
//
//
//    }
//
// public void testUrl(String url) throws Exception {
//
//        GenericRspDTO<CusCustomerVo> customerReq = userCenterApiClient.getCustomerById(16L);
//        CusCustomerVo body = customerReq.getBody();
//
//        BaiQiShiCusVo baiQiShiCusVo = new BaiQiShiCusVo();
//        PhoneInfoVo phoneInfoVo = new PhoneInfoVo();
//        phoneInfoVo.setLoaction("39.8254131034");
//        phoneInfoVo.setLongitude("116.4440917969");
//        phoneInfoVo.setTokenKey("39764206daf14d52b12e25bd51b95b48");
//        baiQiShiCusVo.setCusCustomerVo(body);
//        baiQiShiCusVo.setPhoneInfoVo(phoneInfoVo);
//
//        Map<String, Object> stringObjectMap1 = ObjectUtil.objToMap(baiQiShiCusVo);
//        JSONObject jsonObject = new JSONObject(stringObjectMap1);
//        Console.info("---------->>>>>{}",jsonObject.toJSONString());
//        Console.info("ss","---------->>>>>--------------------------");
//        this.mvc.perform(post(url)
//                .contentType(MediaType.APPLICATION_JSON_UTF8)
//                .content(JSONObject.toJSONString(baiQiShiCusVo)))
////                .param("ss","ssssss"))
//                .andDo(print())
//                .andExpect(status().isOk())
//                .andDo(print());
//
//
//        Console.info("ss","---------------------------------------");
//
//
//    }
//
//
//}
